1. Field of the Invention
The present invention relates to the field of image rendering system and, more particularly, to a method and apparatus for forming multi-level dither images from an input digital image.
2. Description of Related Art
Currently, the halftone method is in wide spread use to print an image by transforming a gray-level image into a binary image in which every pixel is represented by one bit. FIG. 6 shows a general image rendering system, wherein a continuous-tone digital image is processed by a display preprocessor 61 for being transformed into a binary discrete-space image b[x,y]. This binary discrete-space image is entered to a physical reconstruction function element of a binary display device, such as an LCD display or a printer, in order to produce a continuous-space visual image Ixe2x80x2(x, y) output. The display preprocessor 61 primarily applies retrospective re-sampling, tone scale adjust, and sharpen processes to the input continue-tone digital image to produce a continuous-tone digital image I[x, y], which is then processed by a halftone algorithm to produce the binary discrete-space image.
As well known to those skilled in the art, the halftone algorithm can generally be classified into two categories, ordered dither and error diffusion. The ordered dither algorithm generates a pixel bxy(1xe2x89xa6x, yxe2x89xa6n) of a binary dither image by thresholding the pixel Ixy(1xe2x89xa6x, yxe2x89xa6n) at coordinate (x, y) of an original continuous-tone image to a position-dependent set of thresholds. The set of thresholds is constrained to an nxc3x97n dither matrix D(n). The choice of matrix element values and their geometrical arrangement in the matrix determines the resultant image quality. A matrix element Dij(n) can be selected based on the coordinate of the pixel being evaluated: i=x modulo n and j=y modulo n. The decision to pixel Ixy is:   "AutoLeftMatch"                                                        If              ⁢                              xe2x80x83                            ⁢                              I                xy                                      ≧                                          D                ij                            ⁡                              (                n                )                                              ,                            then                                                        b              xy                        =            1                    ,                                              xe2x80x83                            else                                                        b              xy                        =            0                    ,                    
where 1 and 0 represent the white color and black color, respectively. As a result, a binary dither image corresponding to the continuous-tone image can be generated. The quality of such a binary dither image is decided by the patterns of the elements in the dither matrix. Therefore, it is likely to produce visual dither patterns in the binary dither image, which negatively influence the image quality.
The error diffusion algorithm receives its name by diffusing the difference, which is known as an error, between the original and the corresponding dither pixels to their neighbors. The resultant gray-level image can be rendered with better visual quality by introducing blue noise into continuous-tone image with neighborhood operations.
The above conventional methods are primarily used to render 1-bit dither images. FIG. 7 is an actual gray-level diagram (the gray-level values from top to down are 255, 224, 192, 160, 128, 96, 64, 32 and 0). In order to apply those methods to generate multi-level dither images, it is necessary to expand the number of bits that represent the image pixel. In the conventional skill, U.S. Pat. No. 5,689,586 granted to Lin for a xe2x80x9cMethods to Print N-tone Images with Multi-leveling Techniquesxe2x80x9d, U.S. Pat. No. 5,416,481 granted to Chen for a xe2x80x9cAnalog-to-digital Converter with Multi-level Dither Current Inputxe2x80x9d and U.S. Pat. No. 5,742,405 granted to Spaulding et al. for a xe2x80x9cMethod and System for Forming Multi-level Halftone Images from an Input Digital Imagexe2x80x9d disclose the techniques related to generate multi-level dither images. However, these known techniques are evolved from expanding the 1-bit ordered dither algorithm. Therefore, the problem of creating visual dither patterns is hard to overcome, and the produced image quality is unsatisfactory. Accordingly, there is a need to have a novel design for forming multi-level dither images to mitigate and/or obviate the aforementioned problems.
The object of the present invention is to provide a method and apparatus for forming multi-level dither images from an input digital image with a simple structure, which can transform an m-bit gray-level image to an n-bit image (mxe2x89xa7n) to make the n-bit dither image look as much like the higher resolution m-bit digital image as possible, while having the visibility of minimized visual dither patterns for printing and display devices.
With this object in view, the present invention resides in a method for forming a multi-level dither image from an input digital image, which first executes a step (A) to determine the difference between a pixel value of the input digit image and a pixel value of a dither image corresponding to the input digital image. Next, in step (B), the difference is processed by an error filter to correct the pixel value of the input digit image, thereby generating a corrected image pixel value. Then, step (C) is executed to compare the corrected image pixel value to at least two threshold values, each corresponding to a pixel value of the dither image, to determine a threshold value that is nearest to the corrected image pixel value, thereby obtaining a pixel value of the dither image corresponding to the threshold value. Steps (A) to (C) are repeated until all pixels of the input digit image have been transformed into pixels of the dither image.